﻿<%@ Page Title="Chart Of Accounts" Language="C#" MasterPageFile="~/Share/AccMaster.Master"
    AutoEventWireup="true" CodeBehind="fCOA.aspx.cs" Inherits="MixScriptWeb.Accounting.fCOA" MaintainScrollPositionOnPostback="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="padding-left: 10px;">
        <h2 class="jquery_tab">
            Chart Of Accounts
        </h2>
        <br />
        <table cellpadding="0" cellspacing="0" style="width: 100%;" class="table-ui">
            <tr>
                <td style="width: 10%; vertical-align: top; border: 1 solid black;">
                    <asp:Button ID="btnAdd" Visible="false" Text="Add" runat="server" CssClass="button"
                        Width="70px" />
                    <asp:Button ID="btnSubGroupAdd" Visible="false" Text="Add Sub" runat="server" CssClass="button"
                        Width="70px" />
                    <asp:Button ID="btnEdit" Text="Edit" runat="server" CssClass="button" Width="70px" />
                    <asp:Button ID="btnDelete" Text="Delete" OnClick="btnDelete_click" runat="server"
                        CssClass="button" Width="70px" />
                </td>
                <td style="width: 90%; vertical-align: top; border: 1 solid black;" align="right">
                    <asp:Button ID="btnAddAccount" Text="Add Account" Visible="false" runat="server"
                        CssClass="button" Width="90px" />
                </td>
            </tr>
            <tr>
                <td style="width: 10%;">
                    <h2 class="jquery_tab">
                        &nbsp;
                    </h2>
                </td>
                <td style="width: 90%;">
                    <h2 class="jquery_tab">
                        <asp:Label runat="server" Text="" ID="lblJudul" />
                    </h2>
                </td>
            </tr>
            <tr>
                <td style="height: 1600px; width: 10%; vertical-align: top;">
                    <asp:Panel ID="pnlTree" runat="server" Width="100%" Height="100%" ScrollBars="Auto">
                        <fieldset>
                            <legend><b>Chart of Account</b></legend>
                            <asp:TreeView ID="tvCOA" runat="server" CssClass="menuPos chartacc" NodeIndent="15"
                                SelectedNodeStyle-CssClass="menuPos"  ShowLines="True" Width="300px" Height="100%"
                                OnSelectedNodeChanged="tvCOA_SelectedNodeChanged">
                            </asp:TreeView>
                        </fieldset>
                    </asp:Panel>
                </td>
                <td style="height: 1600px; width: 80%; vertical-align: top;">
                    <asp:Panel ID="pnlSub" runat="server" Width="100%" Height="100%" ScrollBars="Auto">
                        <asp:GridView ID="gvDetail" runat="server" Width="100%" Height="100%" AutoGenerateColumns="False"
                            CssClass="gridview" OnRowDataBound="gvdetail_RowDataBound" OnRowCommand="gvdetail_RowCommand">
                            <AlternatingRowStyle CssClass="alt" />
                            <Columns>
                                <asp:TemplateField HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Panel ID="pnlAdd" runat="server">
                                            <a target="_blank" href="POPUpCOA.aspx?PID=<%# Eval("acctnum") %>">Add Sub</a>
                                        </asp:Panel>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <a target="_blank" href="POPUpCOA.aspx?EID=<%# Eval("acctnum") %>&PID=<%# Eval("level") %>">
                                            Edit</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderStyle-Width="40px" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="btnDelete" Text="Delete" runat="server" CommandName="deleting"
                                            CommandArgument='<%# Eval("acctnum") %>' OnClientClick="return(alert('Apakah anda yakin akan menghapusnya ?'))" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="acctnum" HeaderText="COA ID" HeaderStyle-Width="80px" />
                                <asp:BoundField DataField="acctname" HeaderText="NAME" />
                                <asp:BoundField DataField="dbcd" HeaderText="COA TYPE" HeaderStyle-Width="80px" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="level" HeaderText="root" ItemStyle-CssClass="hiden" HeaderStyle-CssClass="hiden" />
                                <asp:BoundField DataField="process" HeaderText="PROCESS" />
                                <asp:BoundField DataField="aplication" HeaderText="APPLICATION" />
                            </Columns>
                            <EditRowStyle BorderColor="Silver" BorderStyle="Solid" />
                            <FooterStyle CssClass="ft" />
                            <PagerStyle BorderStyle="None" BorderWidth="0px" HorizontalAlign="Center" />
                        </asp:GridView>
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
